<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>自己实现双向数据绑定</title>
</head>
<body>

<div id="app">
  <input type="text" :value="msg" @input="handle" />
</div>

<script src="../lib/vue.js"></script>
<script>
  let vm = new Vue({
    el: '#app',
    data: {
      msg: 'Hello World'
    },
    methods: {
      handle(e) {
        this.msg = e.target.value;
      }
    }
  })
</script>

</body>
</html>